package study.itheima.domain;

import java.util.Date;
import java.text.SimpleDateFormat;


public class User {
    private Integer sid;
    private String name;
    private Integer age;
    private Date birthday;
    private String sex;
    private String birth;

    public User() {
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;

    }

    public String getBirth() {
        return new SimpleDateFormat("yyyy-MM-dd").format(birthday);
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "User{" +
                "sid=" + sid +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", birth='" + getBirth() + '\'' +
                '}';
    }
}
